libxc: check for null size file mapping
authorPaul Semel <semelpaul@gmail.com>
Mon, 12 Feb 2018 12:09:15 +0000 (13:09 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 13 Feb 2018 11:45:56 +0000 (11:45 +0000)
commitd9d8b2678fed1de8242afe90c923b2d5d67eb516
treefae3ce52d8447a88f1885eac3853e7fddc23d58f
parent8b1a5268daf0ff1ddca49d2e683e5bfabf6b9988
libxc: check for null size file mapping

Changed the error message when trying to map a null size file.
When doing `xl create` command, we get an Invalid Kernel error
when the file size is greater than zero. For zero length files, we are
falling in the mmap error, and we get an `Invalid parameter` error,
which is not explicit. With this change, we get a `zero length file`
error.

Signed-off-by: Paul Semel <semelpaul@gmail.com>
Acked-by: Wei Liu <wei.liu2@citrix.com>
tools/libxc/xc_dom_core.c